<me:UIVKPOS x:Class="WPFExcelReport.TJLVK05QA"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
            xmlns:me="clr-namespace:WPFExcelReport" 
            xmlns:Localization="clr-namespace:Localization;assembly=Localization"
            xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
            x:Name="TV"  
            Loaded="Window_Loaded"
     >
    <me:UIVKPOS.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter  x:Key="nbv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:TextTrimmingConverter x:Key ="trim"/>
    </me:UIVKPOS.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition> 
            <RowDefinition Height="1*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel>
            <WrapPanel Grid.Row="0">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock   Grid.Column="0" Margin="5,0,0,0" Text="{Binding Source={Localization:Translate Word=品种:}}" FontSize="16"></TextBlock>
                    <ex:TXT72  Grid.Column="1" Text="{Binding ART,ElementName=TV,Converter={StaticResource gb2312}}"
                               Name="txtART" KeyUp="ART_KeyUp" CharacterCasing="Upper" MaxLength="34" Width="100" FontSize="18"/>
                </Grid>
                <Button  Click="QueryCommand" Height="20" Margin="5,0,0,0" Width="24" >
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/Search.png" />
                    </Button.Background>
                </Button>
            </WrapPanel> 
        </StackPanel> 
        <DataGrid  Grid.Row="1" 
                   VerticalAlignment="Top"  
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column"     
                   IsReadOnly="True"
                    ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
                   IsSynchronizedWithCurrentItem="True" 
                   x:Name="dlgMaster"  
                   RowDetailsVisibilityMode="Visible"  
                    >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=VKPART, Converter={StaticResource ResourceKey=trim}}" Header="{Binding Source={Localization:Translate Word=品种}}" Width="Auto"/>
                <DataGridTextColumn Binding="{Binding Path=VKPFARBE, Converter={StaticResource ResourceKey=trim}}" Header="{Binding Source={Localization:Translate Word=花号}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=CPDAT}" Header="{Binding Source={Localization:Translate Word=成品}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ZCDAT}" Header="{Binding Source={Localization:Translate Word=织厂}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JPDAT}" Header="{Binding Source={Localization:Translate Word=计品}}" Width="Auto"/>
                <DataGridTextColumn Binding="{Binding Path=CJDAT}" Header="{Binding Source={Localization:Translate Word=抽检}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=KHDAT}" Header="{Binding Source={Localization:Translate Word=客户}}" Width="Auto" />
              </DataGrid.Columns>
        </DataGrid  >
        <ex:TPage  Grid.Row="2" 
                   Visibility="{Binding IsPage,Converter={StaticResource bv}}"/>
    </Grid>
</me:UIVKPOS>
